package com.v8dn.app.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @title 登陆登出控制器
 * @author lhf
 * @date 2012-11-10 上午2:22:12
 * @description
 */
@Controller
public class LoginLogoutController{
	
	private static Log log=LogFactory.getLog(LoginLogoutController.class);
	
	/**
	 * @title 跳转到登陆页面
	 * @return
	 */
	@RequestMapping(value="/login",method=RequestMethod.GET)
	public String login(@RequestParam(value = "error", required = false) boolean error,ModelMap model){
		log.debug("LoginLogoutController::login::跳转到登陆页面");
		if (error == true) {
			model.put("error","请正确输入用户名或密码");
		}else{
			model.put("error","");
		}
		return "login";
	}
	
}
